﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using MyHotel_DAO;
using DTO;

namespace MyHotel_DAOWS
{
    /// <summary>
    /// Summary description for NhanVienDAOWS
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class NhanVienDAOWS : System.Web.Services.WebService
    {
        NhanVienDAO _dao = new NhanVienDAO();
        [WebMethod]
        public List<NhanVien> getList()
        {
            return _dao.getList();
        }

        [WebMethod]
        public int themNhanvien(NhanVien nv)
        {

            return _dao.themNhanvien(nv);
        }

        [WebMethod]
        public bool xoaNhanVien(NhanVien nv)
        {
            return _dao.xoaNhanVien(nv);
        }

        [WebMethod]
        public bool kiemtraNhanVien_TonTai_TenDangNhap(string tenDangNhap)
        {
            return _dao.kiemtraNhanVien_TonTai_TenDangNhap(tenDangNhap);
        }

        [WebMethod]
        public bool suaNhanVien(NhanVien nv)
        {
            return _dao.suaNhanVien(nv);
        }

        [WebMethod]
        public bool resetMatKhau(int maNV)
        {
            return _dao.resetMatKhau(maNV);
        }
    }
}
